<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="common/include :: header('修改养修服务预约')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-post-edit" th:object="${employee}">
        <input id="employeeId" name="id" type="hidden" th:field="*{id}"/>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">员工姓名：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text"  th:field="*{name}" name="name" required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">员工邮箱：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text" th:field="*{email}" name="email" required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">员工年龄：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text" th:field="*{age}" name="age" required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">是否管理员：</label>
			<div class="col-sm-8">
				<div class="radio-box" th:each="dict : ${@dict.getType('bus_emp_admin')}">
					<input type="radio" th:id="${'admin_' + dict.id}"  th:field="*{admin}" name="admin" th:value="${dict.value}" th:checked="${dict.isDefault}">
					<label th:for="${'admin_' + dict.id}" th:text="${dict.label}"></label>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">是否冻结：</label>
			<div class="col-sm-8">
				<select name="status" class="form-control m-b" th:field="*{status}"  th:with="type=${@dict.getType('bus_emp_status')}" required>
					<option th:each="dict : ${type}" th:text="${dict.label}" th:value="${dict.value}"></option>
				</select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">所在部门：</label>
			<div class="col-sm-8">
				<select name="dept.id" class="form-control m-b" required>
					<option th:each="depts : ${deptList}" th:field="*{dept.id}" th:text="${depts.name}" th:value="${depts.id}">
					</option>
				</select>
			</div>
		</div>
    </form>
</div>
<th:block th:include="common/include :: footer"/>
<th:block th:include="common/include :: datetimepicker"/>
<script type="text/javascript">
    var prefix = ctx + "/business/employee";


    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-post-edit').serialize());
        }
    }


</script>
</body>
</html>
